package VN.EDU.IMIC.DEVELOPER.DOTHANHTUNG.OOP_MVC_LV1.DayOfMonth;

public class DayOfMonthModel {
	public int calculateDay(Month month){
		int day = 0;
		switch (month.getMonth()) {
		case 4:
			return day = 30;
		case 6:
			return day = 30;
		case 9:
			return day = 30;
		case 11:
			return day = 30;
		case 2:
			if (month.getYear()%4 ==0){
				return day = 29;
			}
			else {
				return day = 28;
			}
		default:
			return day = 31;
		}
	}
}
